package com.itheima.service;

import com.itheima.domain.Book;
import com.itheima.domain.User;
import com.itheima.entity.PageResult;

public interface BookService {
    PageResult selectNewBooks(Integer pageNum,Integer pageSize);
    Book findById(String id);
    Integer borrowBook(Book book);
    //查询图书
    PageResult search(Book book,Integer pageNum,Integer pageSize);
    //添加图书
    Integer addBook(Book book);
    //编辑图书信息
     Integer editBook(Book book);
     //查询当前借阅的图书
    PageResult searchBorrowed(Book book, User user,Integer pageNum,Integer pageSize);
    //归还图书
    boolean returnBook(String id,User user);
    //归还确认
    Integer returnConfirm(String id);
}

